<?php

namespace Maestros\Model\Entity;

use Componentes\Model\Entity\GenericModel;

class Materia extends GenericModel {
    
    protected $id;
    protected $codigoExterno;
    protected $nombre;
    protected $_trayectoSemestre;
    protected $_periodoFase;
    protected $_materiaEje;
    protected $horasHta;
    protected $horasHti;
    protected $horasHte;
    protected $horasExtras;
    protected $horasHtaFactor;
    protected $horaHtaFactorEgresado;
    protected $credito;
    
    public function __construct(array $options = null) {
        if (is_array($options)) {
            $this->setOptions($options);
        }
    }
    
    public function setId($idMateria) {
        $this->id = $idMateria;
    }
    
    public function getId() {
        return $this->id;
    }

    public function setCodigoExterno($codigoExterno) {
        $this->codigoExterno = $codigoExterno;
    }
    
    public function getCodigoExterno() {
        return $this->codigoExterno;
    }

    public function setNombre($nombre) {
        $this->nombre = $nombre;
    }
    
    public function getNombre() {
        return $this->nombre;
    }

    public function setTrayectoSemestre($idTrayectoSemestre) {
        $this->_trayectoSemestre = $idTrayectoSemestre;
    }
    
    public function getTrayectoSemestre() {
        return $this->_trayectoSemestre;
    }

    public function setPeriodoFase($idPeriodoFase) {
        $this->_periodoFase = $idPeriodoFase;
    }
    
    public function getPeriodoFase() {
        return $this->_periodoFase;
    }

    public function setMateriaEje($idMateriaEje) {
        $this->_materiaEje = $idMateriaEje;
    }
    
    public function getMateriaEje() {
        return $this->_materiaEje;
    }

    public function setHorasHta($horasHta) {
        $this->horasHta = $horasHta;
    }
    
    public function getHorasHta() {
        return $this->horasHta;
    }

    public function setHorasHti($horasHti) {
        $this->horasHti = $horasHti;
    }
    
    public function getHorasHti() {
        return $this->horasHti;
    }

    public function setHorasHte($horasHte) {
        $this->horasHte = $horasHte;
    }
    
    public function getHorasHte() {
        return $this->horasHte;
    }

    public function setHorasExtras($horasExtras) {
        $this->horasExtras = $horasExtras;
    }
    
    public function getHorasExtras() {
        return $this->horasExtras;
    }

    public function setHorasHtaFactor($horasHtaFactor) {
        $this->horasHtaFactor = $horasHtaFactor;
    }
    
    public function getHorasHtaFactor() {
        return $this->horasHtaFactor;
    }

    public function setHoraHtaFactorEgresado($horaHtaFactorEgresado) {
        $this->horaHtaFactorEgresado = $horaHtaFactorEgresado;
    }
    
    public function getHoraHtaFactorEgresado() {
        return $this->horaHtaFactorEgresado;
    }

    public function setCredito($credito) {
        $this->credito = $credito;
    }

    public function getCredito() {
        return $this->credito;
    }
    
    /**
     * Convierte un Objeto en un Array
     * @param    object  $object El objeto a convertir
     * @return  arreglo
     */
    public function objectToArray() {
        if (!is_object($this) && !is_array($this)) {
            return $this;
        }
        if (is_object($this)) {
            $array = array(
                'id' => $this->id,
                'codigoExterno' => $this->codigoExterno,
                'nombre' => $this->nombre,
                '_trayectoSemestre' => $this->_trayectoSemestre,
                '_periodoFase' => $this->_periodoFase,
                '_materiaEje' => $this->_materiaEje,
                'horasHta' => $this->horasHta,
                'horasHti' => $this->horasHti,
                'horasHte' => $this->horasHte,
                'horasExtras' => $this->horasExtras,
                'horasHtaFactor' => $this->horasHtaFactor,
                'horaHtaFactorEgresado' => $this->horaHtaFactorEgresado,
                'credito' => $this->credito
                
            );
        }
        return $array;
    }

}
